package com.reggie.mapper;

import com.github.pagehelper.Page;
import com.reggie.annotation.AutoFill;
import com.reggie.constant.AutoFillConstant;

import com.reggie.dto.CategoryPageQueryDTO;
import com.reggie.entity.Category;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {
    @AutoFill(Type = AutoFillConstant.INSERT)
     void save(Category category);


    Page<Category> pageQuery(CategoryPageQueryDTO pageQueryDTO);

    @AutoFill(Type=AutoFillConstant.UPDATE)
    void deleteById(Long id);
    //修改分类
    @AutoFill(Type = AutoFillConstant.UPDATE)
    void update(Category category);

    void startOrStop(Category category);

    List<Category> list(Integer type);
}
